<example name="Pager Ng">
  <file type="html">
    <div ng-app="Example.pager" ng-strict-di ng-controller="ExampleCtrl as ctrl">
      <rg-pager
        total="ctrl.total"
        current-page="ctrl.currentPage"
        on-page-change="ctrl.onPageChange"
      ></rg-pager>
    </div>
  </file>
  <file type="js">
    import angular from 'angular';
    import RingPager from '@jetbrains/ring-ui/components/pager-ng/pager-ng';

    const pagerModule = angular.module('Example.pager', [RingPager]);

    pagerModule.controller('ExampleCtrl', function () {
      this.total = 750;
      this.currentPage = 1;

      this.onPageChange = page => {
        this.currentPage = page;
      }
    });
  </file>
</example>
